package objects;

/**
 * @author JJP
 * This is the class pass around between GUI, LOGIC,BACKEN
 * It is the command after processing by FormatProccessor.
 * 
 * 
 * 
 */

import java.util.ArrayList;
import java.util.Date;

public class Command {
	// Command Type
	private String commandType;

	// task related
	private Event e;
	private String detail;
	private String tag;
	private int priority;
	private Date startDate;
	private Date endDate;
	
	private String Parent;
	// keyword
	private ArrayList<String> sortKeyWords;
	private ArrayList<String> searchKeyWords;

	// others
	private String inputString;
	private String fileName;

	/**
	 * Constructor Be careful, this constructor only works if consecutive
	 * information are entered!!!
	 * 
	 * @param objects
	 */
	@SuppressWarnings("unchecked")
	public Command(Object... objects) {
		this.commandType = (String) objects[0];
		this.detail = (String) objects[1];
		this.tag = (String) objects[2];
		this.priority = (Integer) objects[3];
		this.startDate = (Date) objects[4];
		this.endDate = (Date) objects[5];
		this.sortKeyWords = (ArrayList<String>) objects[6];
		this.searchKeyWords = (ArrayList<String>) objects[7];
		this.inputString = (String) objects[8];
		this.fileName = (String) objects[9];
	}

	// =========================================

	public void setCommandType(String commandType) {
		this.commandType = commandType;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public void setSortKeyWords(ArrayList<String> sortKeyWords) {
		this.sortKeyWords = sortKeyWords;
	}

	public void setSearchKeyWords(ArrayList<String> searchKeyWords) {
		this.searchKeyWords = searchKeyWords;
	}

	public void setInputString(String inputString) {
		this.inputString = inputString;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	// =============================================
	public String getCommandType() {
		return commandType;
	}

	public String getDetail() {
		return detail;
	}

	public String getTag() {
		return tag;
	}

	public int getPriority() {
		return priority;
	}

	public Date getStartDate() {
		return startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public ArrayList<String> getSortKeyWords() {
		return sortKeyWords;
	}

	public ArrayList<String> getSearchKeyWords() {
		return searchKeyWords;
	}

	public String getInputString() {
		return inputString;
	}

	public String getFileName() {
		return fileName;
	}

	public Event getE() {
		return e;
	}

	public void setE(Event e) {
		this.e = e;
	}

	public String getParent() {
		return Parent;
	}

	public void setParent(String parent) {
		Parent = parent;
	}
}
